<!DOCTYPE html>
<html xmlns:layout="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
	layout:decorate="~{common/layoutAdmin}">

<head>
	<meta charset="UTF-8">
	<title>试题练习管理系统</title>
</head>

<body>
	<div layout:fragment="fragment_body">
		<!--<el-row>
			<el-tabs v-model="activeTab" @tab-click="tabClick">
			    <el-tab-pane label="所有生效" name="1"></el-tab-pane>
			    <el-tab-pane label="注册待审核" name="0"></el-tab-pane>
			    <el-tab-pane label="离校" name="2"></el-tab-pane>
			  </el-tabs>
		</el-row>-->
		<el-row>
			<el-table :data="accounts" border style="width: 100%">
				<el-table-column prop="accountNick" label="昵称">
				</el-table-column>
				<!--<el-table-column prop="accountOpenId" label="openid">-->
				</el-table-column>
				<el-table-column prop="accountLogo" label="头像">
					<template slot-scope="scope">
						<el-avatar :src="scope.row.accountLogo"></el-avatar>
					</template>
				</el-table-column>
				<el-table-column prop="accountTime" label="创建时间">
				</el-table-column>
			</el-table>
		</el-row>
	</div>
</body>
<script type="text/javascript" layout:fragment="fragment_script">
	let vueData = {
		accounts: [],
		activeTab: '1',
		query:{}
	}
	let vueMethods = {
		tabClick(){
			this.getAccounts()
		},
		getAccounts() {
			let that = this
			that.query.active = that.activeTab
			postRequst('/admin/getAccounts', that.query, true).then(function (resp) {
				that.accounts = resp.rows
			})
		},
		/**accountActive(accountId, active) {
			let that = this
			postRequst('/admin/accountActive', {id: accountId, active: active}, true).then(function (resp) {
				if(resp.status == 0){
					that.getAccounts()
					that.$message({message: resp.msg, type: "success"});
				}else{
					that.$message({message: resp.msg, type: "error"});
				}
			})
		}**/
	}
	function vueCreated() {
		let that = this
		that.getAccounts()
	}

	// 初始化VUE
	 
</script>

</html>